﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Algorithm.Middle_1447_SimplifiedFractions
{
    class MainProject
    {
        static void Main(string[] args)
        {
            foreach (var item in SimplifiedFractions(4))
            {
                Console.WriteLine(item);
            }

            Console.ReadKey();
        }
        public static IList<string> SimplifiedFractions(int n)
        {
            IList<string> listStr = new List<string>();
            IList<double> listValue = new List<double>();
            double value = 0;
            for (double i = 1; i < n; i++)
            {
                for (double j = i+1; j <= n; j++)
                {
                    value = i / j;
                    if (!listValue.Contains(value))
                    {
                        listValue.Add(value);
                        listStr.Add(string.Format("{0}/{1}", i, j));
                    }
                }
            }
            return listStr;
        }
    }
}
